<?php
namespace BP\En;
require_once("BP/Difference/Handler/CommonUtils.php");
abstract class Method {
	public $HisMsgShowType;	// MsgShowType
	protected $_row;	// Row
	protected $_HisAttrs;	// Attrs
	public $Title;	// String
	public $Help;	// String
	public $GroupName;	// String
	public $Warning;	// String
	public $Icon;	// String
	public $ToolTip;	// String
	public $Target;	// String
	public $Height;	// int
	public $Width;	// int
	public $IsVisable;	// boolean
	private function __init() { // default class members
		$this->HisMsgShowType = MsgShowType::$Blank;
		$this->_row = NULL;
		$this->_HisAttrs = NULL;
		$this->Title = NULL;
		$this->Help = NULL;
		$this->GroupName = "基本方法";
		$this->Warning = "";
		$this->Icon = NULL;
		$this->ToolTip = NULL;
		$this->Target = "OpenWin";
		$this->Height = 600;
		$this->Width = 800;
		$this->IsVisable =  TRUE ;
	}
	public function Request ($key) // [String key]
	{
		return $CommonUtils->getRequest()->getParameter($key);
	}
	public function getRequestRefMyPK () 
	{
		$s = $this->Request("RefMyPK");
		if (($s . NULL))
		{
			$s = $this->Request("RefPK");
		}
		return $s;
	}
	public function getRequestRefNo () 
	{
		return $this->Request("RefNo");
	}
	public function getRequestRefOID () 
	{
		return $Integer->parseInt($this->Request("RefOID"));
	}
	public function GetValByKey ($key) // [String key]
	{
		return $this->getRow()->GetValByKey($key);
	}
	public function GetValStrByKey ($key) // [String key]
	{
		return $this->GetValByKey($key);
	}
	public function GetValIntByKey ($key) // [String key]
	{
		return $this->GetValByKey($key);
	}
	public function GetValDecimalByKey ($key) // [String key]
	{
		return $this->GetValByKey($key);
	}
	public function GetValBoolByKey ($key) // [String key]
	{
		if (($this->GetValIntByKey($key) == 1))
		{
			return  TRUE ;
		}
		return  FALSE ;
	}
	public function SetValByKey_String_I ($attrKey, $val) // [String attrKey, int val]
	{
		$this->getRow()->SetValByKey($attrKey, $val);
	}
	public function SetValByKey_String_L ($attrKey, $val) // [String attrKey, long val]
	{
		$this->getRow()->SetValByKey($attrKey, $val);
	}
	public function SetValByKey_String_F ($attrKey, $val) // [String attrKey, float val]
	{
		$this->getRow()->SetValByKey($attrKey, $val);
	}
	public function SetValByKey_String_BigDecimal ($attrKey, $val) // [String attrKey, BigDecimal val]
	{
		$this->getRow()->SetValByKey($attrKey, $val);
	}
	public function SetValByKey_String_Object ($attrKey, $val) // [String attrKey, Object val]
	{
		$this->getRow()->SetValByKey($attrKey, $val);
	}
	public function getRow () 
	{
		if (($this->getHisAttrs() == NULL))
		{
			return NULL;
		}
		if (($this->_row == NULL))
		{
			$this->_row = new Row();
			$this->_row->LoadAttrs($this->getHisAttrs());
		}
		return $this->_row;
	}
	public function setRow ($value) // [Row value]
	{
		$this->_row = $value;
	}
	public static function constructor__ () 
	{
		$me = new self();
		$me->__init();
		return $me;
	}
	public function getHisAttrs () 
	{
		if (($this->_HisAttrs == NULL))
		{
			$this->_HisAttrs = Attrs::constructor__();
		}
		return $this->_HisAttrs;
	}
	public function GetIcon ($path) // [String path]
	{
		if (($this->Icon == NULL))
		{
			return "<img src='../Img/Btn/Do.gif'  border=0 />";
		}
		else
		{
			return $this->Icon;
		}
	}
	abstract function Do (); 
	abstract function Init (); 
	abstract function getIsCanDo (); 
}
?>
